﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class admin_managesysconfig : System.Web.UI.Page
{
    Sysconfig s = new Sysconfig();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack) 
        {
            this.TextBox1.Text = Sysconfig.GetMainTitle();
            this.TextBox2.Text = Sysconfig.GetMainKeyWords();
            this.TextBox3.Text = Sysconfig.GetDzswTitle();
            this.TextBox4.Text = Sysconfig.GetDzswKeyWords();
            this.TextBox5.Text = Sysconfig.GetRdgcTitle();
            this.TextBox6.Text = Sysconfig.GetRdgcKeyWords();
            this.TextBox7.Text = Sysconfig.GetTwzzTitle();
            this.TextBox8.Text = Sysconfig.GetTwzzKeyWords();
            this.TextBox9.Text = Sysconfig.GetDescription();
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        s.Maintitle = this.TextBox1.Text;
        s.Mainkeywords = this.TextBox2.Text;
        s.Dzswtitle = this.TextBox3.Text;
        s.Dzswkeywords = this.TextBox4.Text;
        s.Rdgctitle = this.TextBox5.Text;
        s.Rdgckeywords = this.TextBox6.Text;
        s.Twzztitle = this.TextBox7.Text;
        s.Twzzkeywords = this.TextBox8.Text;
        s.Description = this.TextBox9.Text;
        s.UpdateSysConfig(s);
        Response.Write("<script>alert('保存成功');window.location='managesysconfig.aspx'</script>");
    }
}
